//
//  UITextField+Extension.swift
//  TeaShop
//
//  Created by 刘泽 on 2018/1/16.
//  Copyright © 2018年 刘泽. All rights reserved.
//

import Foundation

import UIKit
extension UITextField {
    
    
    public func setLeftLabel(_ str : String ,color:UIColor =  UIColor.darkGray)  {
          let label = UILabel.init()
          label.text = str
          label.font  = self.font
          label.textColor = color
          label.sizeToFit()
          self.leftView = label
          self.leftViewMode = .always
    }
    
    
    
    
    
}
